<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>勘察设计审查情况统计</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/templates/act/process-xl.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form searchForm" action="" style="padding-left: 20px;">
    申报时间:
    <div class="layui-input-inline" style="width: 150px;">
        <input type="text" name="" class="layui-input timeSelectBox" autocomplete="off" placeholder="yyyy-MM-dd">
    </div>
    至
    <div class="layui-input-inline" style="width: 150px;">
        <input type="text" name="" class="layui-input timeSelectBox" autocomplete="off" placeholder="yyyy-MM-dd">
    </div>
    <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
    <button class="layui-btn" lay-submit lay-filter="formClear">导出</button>
</form>
<table class="layui-hide" id="dataList" lay-filter="dataList"></table>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>

<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    var configureCom = {};
    layui.use(['jquery', 'configureCom', 'configure', 'sessionFun', 'table', 'matchDict','laydate'], function () {
        var $ = layui.jquery;
        var configure = layui.configure;
        var table = layui.table;
        var sessionFun = layui.sessionFun;
        var matchDict = layui.matchDict;
        var laydate = layui.laydate;
        configureCom = layui.configureCom;
        $('.timeSelectBox').each(function (index, item) {
            laydate.render({
                elem: item
            })
        });
        var cols = [[
            {field: 'orgName', title: '单位名称'},
            {field: 'prjCount', title: '勘察设计项目总数'},
            {field: 'onePassPrjCount', title: '一次审查合格数'},
            {field: 'allArea', title: '一次审查合格率'},
            {field: 'allInvest', title: '第一次审查不合格数'},
            {field: 'qtCount', title: '违反一般性规范数'},
            {fixed: '', title: '违反强条数'}
        ]];
        configureCom.tableRenderGet(configure.REPORT_KC_SJ_ORG_REVIEW_STATUS_HTTP, {}, cols, 'dataList', 10, '', 'toolbarOrg');
        //头工具栏事件
        table.on('toolbar(dataList)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            sessionFun.remove(configure.SESSION_PROJECT_LIST_DATA);
            switch (obj.event) {
                case 'add':
                    editItem('新建项目', configure.UNIT_PROJECT_CREATE_HTTP);
                    break;
            }
        });
        //每行操作
        table.on('tool(dataList)', function (obj) {
            var data = obj.data;
            sessionFun.set(configure.SESSION_PROJECT_LIST_DATA, data);
            sessionFun.remove(configure.SESSION_PROJECT_WAIT_LIST_DATA, data);
            if (obj.event === 'detail') {
                top.layer.open({
                    type: 2,
                    title: '业绩统计',
                    area: configureCom.Psize1,
                    content: configureCom.nocache(configure.PERFORMANCE_STATISTICS_HTML),
                    btn: ['关闭'],
                    yes: function (index, layero) {
                        top.layer.close(index);
                    },
                    success: function (layero, index) {
                        top.layer.full(index);
                    }
                });
            }
        });
        //监听搜索
        configureCom.tableSearch();
    });
</script>
</body>
</html>